#pragma once

template<class Iterator,class Ref,class Ptr>
class ReverseIterator
{
public:
	typedef ReverseIterator<Iterator,Ref,Ptr> Self;
	ReverseIterator(Iterator it)
		:_it(it)
	{}
	Self& operator++()
	{
		--_it;
		return *this;
	}
	bool operator!=(const Self& s)
	{
		return _it != s._it;
	}
	/*bool operator!=(const Self& s)const
	{
		return _it != s._it;
	}*/
	Ref& operator*()
	{
		return *_it;
	}
	Ptr& operator->()
	{
		return _it.operator->();
	}

private:
	Iterator _it;
};
